package vue.panneau1;
import java.awt.*;
import javax.swing.*;

import vue.panneau2.Zone2;
import vue.panneau3.Zone3;

public class Zone1 extends JInternalFrame
{
	private static final long serialVersionUID = 1L;
	private Interface2DZone1 zone2D;
	private Interface3DZone1 zone3D;
	
	public Zone1(Zone2 z2,Zone3 z3,boolean is3D)
	{	
		super("Equations", 
	              true, //resizable
	              false, //closable
	              true, //maximizable
	              false);//iconifiable
		
		Dimension tailleEcran = getToolkit().getScreenSize();
		this.setSize(tailleEcran.width/2, tailleEcran.height/2);
		
		if(is3D)
		{
			zone3D = new Interface3DZone1(z2,z3);
			this.add(zone3D,BorderLayout.CENTER);
		}
		else
		{
			zone2D = new Interface2DZone1(z2,z3);
			this.add(zone2D,BorderLayout.CENTER);
		}
	}
	
	public Interface2DZone1 getInterface2DZone1()
	{
		return zone2D;
	}
	
	public Interface3DZone1 getInterface3DZone1()
	{
		return zone3D;
	}
}
